
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
// import 'package:oktoast/oktoast.dart' as OKToast;

void showToast(
  String text, {
  gravity = ToastGravity.CENTER,
  toastLength = Toast.LENGTH_SHORT,
}) {

  // showOKToast(text);
  Fluttertoast.showToast(
    msg: text,
    toastLength: toastLength,
    gravity: gravity,
    timeInSecForIosWeb: 1,
    backgroundColor: Color.fromRGBO(0, 0, 0, 0.65), // 灰色背景
    fontSize: 16.0,
  );
}
// void showOKToast(String text) {
//   OKToast.showToast(text,backgroundColor: Colors.black.withOpacity(0.65),radius: 8);
// }
